home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
RLaB
/
rlib
/
union.r
< prev
next >
Wrap
Text File
|
1994-04-25
|
576b
|
25 lines
//-------------------------------------------------------------------//
// union
// Syntax: union ( A , B )
// Description:
// The union function returns a vector set that is the union of the
// two sets A, and B.
// See Also: complement, intersection, set
//-------------------------------------------------------------------//
union = function ( A, B )
{
if (min (size (A)) != 1) {
error ("union: 1st argument must be a vector");
}
if (min (size (B)) != 1) {
error ("union: 2nd argument must be a vector");
}
return set ( [ A[:] ; B[:] ] )
};